<?php require 'view/admin/template/header.html'; ?>
    <div id="main">
    <?php require 'view/admin/template/left.html'; ?>
        <div id="rside">
            <table>
                <tr>
                    <td>序号</td>
                    <td>栏目名称</td>
                    <td>文章数</td>
                    <td>操作</td>
                </tr>
                <?php foreach($res as $v){ ?>
                <tr>
                    <td><?php echo $v['cat_id'];?></td>
                    <td><?php echo $v['cat_name'];?></td>
                    <td><span class="badge"><?php echo $v['num'];?></span></td>
                    <td>
                        <a href="catedit.php?id=<?php echo $v['cat_id'];?>">编辑</a>
                        / <a href="catdel.php?id=<?php echo $v['cat_id'];?>">删除</a>
                    </td>
                </tr>
                <?php } ?>
            </table>
        </div>
    </div>
<?php require 'view/admin/template/footer.html'; ?>